'use strict';
module.exports = (sequelize, DataTypes) => {
  const leasingmanagement = sequelize.define('leasingmanagements', {
    userId: {
      type: DataTypes.INTEGER,
      primaryKey: true,
      allowNull: false
    },
    carId: {
      type: DataTypes.INTEGER,
      primaryKey: true,
      allowNull: false
    },
    time: {
      type: DataTypes.INTEGER,
      allowNull: false,
      defaultValue: 0
    },
    money: {
      type: DataTypes.INTEGER,
      allowNull: false
    },
    createdAt: {
      allowNull: false,
      type: DataTypes.DATE
    },
    updatedAt: {
      allowNull: false,
      type: DataTypes.DATE
    }
  }, {
    tableName: 'leasingmanagements',
    charset: 'utf8mb4',
    collate: 'utf8mb4_bin'
  });
  leasingmanagement.associate = function(models) {
    // associations can be defined here
  };
  return leasingmanagement;
};